def encode(value):
    return {
        'close': 0,
        'rotation': 1,
        'move': 2,
        'open': 3,
    }.get(value)
